<div class="list-div" id="listDiv">
<table>
    <thead>
    <tr>
        <th>订单号</th>
        <th>下单时间</th>
        <th>收货人</th>
        <th>总金额</th>
        <th>快递单号</th>
        <th>订单状态</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <?php foreach($data as $k=>$v):?>
    <tr>
        <td>{$v.order_sn}</td>
        <td><?php echo date('Y-m-d H:i:s' , $v['addtime'])?></td>
        <td>
            <p>{$v.shr_name}[TEL:{$v.shr_tel}]</p>
            <p>{$v.shr_province}{$v.shr_city}{$v.shr_area}{$v.address}</p>
        </td>
        <td>￥{$v.total_price}</td>
        <td><?php if($v['post_number']):?>{$v.post_number}<?php else:?>无<?php endif;?></td>
        <td>
            <?php if($v['order_status']=='正常'):?>
               <?php if($v['pay_status']=='是'):?>
                已付款 - <?php echo $v['post_status'] == 0 ? '未发货':($v['post_status'] ==1?'已发货':'已签收'); ?>
            <?php else:?>
            未付款
            <?php endif;?>
            <?php else:?>
            已关闭
            <?php endif;?>
        </td>
        <td><a class="btn btn-xs btn-primary" href="<?php echo U('edit',array('order_id' =>$v['id'],'p'=>I('get.p')));?>" title="查看">查看</a>
            <?php if($v['order_status']=='关闭'):?></td>
        <a class="btn btn-xs btn-danger" href="<?php echo U('delete',array('id'=>$v['id'],'p'=>I('get.p')))?>" onclick="return confirm('确定要删除吗')">删除订单</a></td>
        <?php endif;?>
    </tr>
    <?php endforeach;?>
    </tbody>
</table>
    </div>